\(\int \frac {\sin (x)}{(1+\cos (x))^2} \, dx\) [12]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 9, antiderivative size = 6 \[ \int \frac {\sin (x)}{(1+\cos (x))^2} \, dx=\frac {1}{1+\cos (x)} \]

[Out]

1/(1+cos(x))

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 6, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {2746, 32} \[ \int \frac {\sin (x)}{(1+\cos (x))^2} \, dx=\frac {1}{\cos (x)+1} \]

[In]

Int[Sin[x]/(1 + Cos[x])^2,x]

[Out]

(1 + Cos[x])^(-1)

Rule 32

Int[((a_.) + (b_.)*(x_))^(m_), x_Symbol] :> Simp[(a + b*x)^(m + 1)/(b*(m + 1)), x] /; FreeQ[{a, b, m}, x] && N
eQ[m, -1]

Rule 2746

Int[cos[(e_.) + (f_.)*(x_)]^(p_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Dist[1/(b^p*f), S
ubst[Int[(a + x)^(m + (p - 1)/2)*(a - x)^((p - 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x]
&& IntegerQ[(p - 1)/2] && EqQ[a^2 - b^2, 0] && (GeQ[p, -1] ||  !IntegerQ[m + 1/2])

Rubi steps \begin{align*} \text {integral}& = -\text {Subst}\left (\int \frac {1}{(1+x)^2} \, dx,x,\cos (x)\right ) \\ & = \frac {1}{1+\cos (x)} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 12, normalized size of antiderivative = 2.00 \[ \int \frac {\sin (x)}{(1+\cos (x))^2} \, dx=\frac {1}{2} \sec ^2\left (\frac {x}{2}\right ) \]

[In]

Integrate[Sin[x]/(1 + Cos[x])^2,x]

[Out]

Sec[x/2]^2/2

Maple [A] (verified)

Time = 0.31 (sec) , antiderivative size = 7, normalized size of antiderivative = 1.17

method result size
derivativedivides \(\frac {1}{\cos \left (x \right )+1}\) \(7\)
default \(\frac {1}{\cos \left (x \right )+1}\) \(7\)
norman \(\frac {\left (\tan ^{2}\left (\frac {x}{2}\right )\right )}{2}\) \(9\)
parallelrisch \(\frac {\left (\tan ^{2}\left (\frac {x}{2}\right )\right )}{2}\) \(9\)
risch \(\frac {2 \,{\mathrm e}^{i x}}{\left ({\mathrm e}^{i x}+1\right )^{2}}\) \(17\)

[In]

int(sin(x)/(cos(x)+1)^2,x,method=_RETURNVERBOSE)

[Out]

1/(cos(x)+1)

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 6, normalized size of antiderivative = 1.00 \[ \int \frac {\sin (x)}{(1+\cos (x))^2} \, dx=\frac {1}{\cos \left (x\right ) + 1} \]

[In]

integrate(sin(x)/(1+cos(x))^2,x, algorithm="fricas")

[Out]

1/(cos(x) + 1)

Sympy [A] (verification not implemented)

Time = 0.16 (sec) , antiderivative size = 5, normalized size of antiderivative = 0.83 \[ \int \frac {\sin (x)}{(1+\cos (x))^2} \, dx=\frac {1}{\cos {\left (x \right )} + 1} \]

[In]

integrate(sin(x)/(1+cos(x))**2,x)

[Out]

1/(cos(x) + 1)

Maxima [A] (verification not implemented)

none

Time = 0.22 (sec) , antiderivative size = 6, normalized size of antiderivative = 1.00 \[ \int \frac {\sin (x)}{(1+\cos (x))^2} \, dx=\frac {1}{\cos \left (x\right ) + 1} \]

[In]

integrate(sin(x)/(1+cos(x))^2,x, algorithm="maxima")

[Out]

1/(cos(x) + 1)

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 6, normalized size of antiderivative = 1.00 \[ \int \frac {\sin (x)}{(1+\cos (x))^2} \, dx=\frac {1}{\cos \left (x\right ) + 1} \]

[In]

integrate(sin(x)/(1+cos(x))^2,x, algorithm="giac")

[Out]

1/(cos(x) + 1)

Mupad [B] (verification not implemented)

Time = 13.07 (sec) , antiderivative size = 6, normalized size of antiderivative = 1.00 \[ \int \frac {\sin (x)}{(1+\cos (x))^2} \, dx=\frac {1}{\cos \left (x\right )+1} \]

[In]

int(sin(x)/(cos(x) + 1)^2,x)

[Out]

1/(cos(x) + 1)